package com.wuming.caiwu.service;


import com.wuming.caiwu.core.BusinessException;
import com.wuming.caiwu.model.SysUserRole;

import java.util.List;

/**
 * 系统用户角色服务
 * Created by hanfei on 16/4/19.
 */
public interface SysUserRoleService {

    /**
     * 保存用户信息
     *
     * @param member 用户信息
     * @throws BusinessException
     */
    void saveSysUserRole(SysUserRole member) throws BusinessException;

    /**
     * 更新用户信息
     *
     * @param member 用户信息
     * @throws BusinessException
     */
    void modifySysUserRole(SysUserRole member) throws BusinessException;

    /**
     * 根据id查询用户信息
     *
     * @param id 用户id
     * @return 用户信息
     * @throws BusinessException
     */
    SysUserRole getSysUserRoleById(Long id) throws BusinessException;

    /**
     * 根据id删除用户信息
     *
     * @param id 用户id
     * @throws BusinessException
     */
    void removeSysUserRoleById(Long id) throws BusinessException;

    /**
     * 根据用户id查询用户角色
     * @param adminId  用戶ID
     * @return 用戶角色
     * @throws BusinessException
     */
    SysUserRole getUserRoleByUserId(Long adminId) throws BusinessException;

}
